import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import store from './vuex/store'

import MuseUI from 'muse-ui'
import 'muse-ui/dist/muse-ui.css'
import 'muse-ui/dist/theme-teal.css'
// import 'font-awesome/css/font-awesome.min.css'
import './assets/css/style.less'

import leComponent from '@/components'

Vue.use(MuseUI)
Vue.use(Vuex)
Vue.use(leComponent)

router.afterEach((to) => {
	document.title = to.name + ' - 美艺';
	if(!to.name){
		router.push('/login');
	}
});

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
